﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace Susha.Models
{
    public class UserRegistrationView : UserClass
    {
        [Compare("Password", ErrorMessage = "Пароли должны совпадать")]
        public String ConfirmPassword { get; set; }

        [Required(ErrorMessage="Обязательное поле")]
        public String Captcha { get; set; }

        public UserClass Convert2UserClass()
        {
            UserClass user = new UserClass();
            user.Email = this.Email;
            user.Password = this.Password;

            return user;
        }
    }
}